1: | terms(N) | → cons(recip(sqr(N)),terms(s(N))) | |
2: | sqr(0) | → 0 | |
3: | sqr(s(X)) | → s(add(sqr(X),dbl(X))) | |
4: | dbl(0) | → 0 | |
5: | dbl(s(X)) | → s(s(dbl(X))) | |
6: | add(0,X) | → X | |
7: | add(s(X),Y) | → s(add(X,Y)) | |
8: | first(0,X) | → nil | |
9: | first(s(X),cons(Y,Z)) | → cons(Y,first(X,Z)) | |
10: | TERMS(N) | → SQR(N) | |
11: | TERMS(N) | → TERMS(s(N)) | |
12: | SQR(s(X)) | → ADD(sqr(X),dbl(X)) | |
13: | SQR(s(X)) | → SQR(X) | |
14: | SQR(s(X)) | → DBL(X) | |
15: | DBL(s(X)) | → DBL(X) | |
16: | ADD(s(X),Y) | → ADD(X,Y) | |
17: | FIRST(s(X),cons(Y,Z)) | → FIRST(X,Z) | |